﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
using System;
using System.Collections.Generic;
namespace WPFExcelReport
{

    public partial class VVKADR
    {
        public void NEWVKADR(Dictionary<string, object> pm)
        { 
            dwData = TBMain.NewRow();
            dwData["VKAMANDANT"] = app.Mandant;
            dwData["VKASA"] = pm["KASA"].ToString();
            dwData["VKAAUFKRS"] = pm["KRS"].ToString();
            dwData["VKAAUFLFD"] = pm["LFD"].ToString();
            dwData["VKAAUFPOS"] = pm["POS"].ToString();
            Insert(dwData);
        }
        public virtual void Insert(DataRow _dwKD)
        {
            InsertVKADR(_dwKD, app.company);
            TBMain.Rows.InsertAt(_dwKD, 0);
        }
    }
    public partial class VVKADR
    {

        public string VKAMANDANT { get { if (dwMaster == null) return ""; return dwMaster["VKAMANDANT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAMANDANT"] = value; OnPropertyChanged("VKAMANDANT", value); } } //lENGth 2
        public string VKASA { get { if (dwMaster == null) return ""; return dwMaster["VKASA"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKASA"] = value; OnPropertyChanged("VKASA", value); } } //lENGth 2
        public string VKAAUFKRS { get { if (dwMaster == null) return ""; return dwMaster["VKAAUFKRS"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAUFKRS"] = value; OnPropertyChanged("VKAAUFKRS", value); } } //lENGth 2
        public string VKAAUFLFD { get { if (dwMaster == null) return ""; return dwMaster["VKAAUFLFD"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAUFLFD"] = value; OnPropertyChanged("VKAAUFLFD", value); } } //lENGth 6
        public string VKAAUFPOS { get { if (dwMaster == null) return ""; return dwMaster["VKAAUFPOS"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAUFPOS"] = value; OnPropertyChanged("VKAAUFPOS", value); } } //lENGth 3
        public string VKAAENDST { get { if (dwMaster == null) return ""; return dwMaster["VKAAENDST"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAENDST"] = value; OnPropertyChanged("VKAAENDST", value); } } //lENGth 3
        public string VKALNAME1 { get { if (dwMaster == null) return ""; return dwMaster["VKALNAME1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALNAME1"] = value; OnPropertyChanged("VKALNAME1", value); } } //lENGth 40
        public string VKALNAME2 { get { if (dwMaster == null) return ""; return dwMaster["VKALNAME2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALNAME2"] = value; OnPropertyChanged("VKALNAME2", value); } } //lENGth 40
        public string VKALSTRASSE1 { get { if (dwMaster == null) return ""; return dwMaster["VKALSTRASSE1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALSTRASSE1"] = value; OnPropertyChanged("VKALSTRASSE1", value); } } //lENGth 40
        public string VKALSTRASSE2 { get { if (dwMaster == null) return ""; return dwMaster["VKALSTRASSE2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALSTRASSE2"] = value; OnPropertyChanged("VKALSTRASSE2", value); } } //lENGth 40
        public string VKALLKZ { get { if (dwMaster == null) return ""; return dwMaster["VKALLKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALLKZ"] = value; OnPropertyChanged("VKALLKZ", value); } } //lENGth 3
        public string VKALPLZ { get { if (dwMaster == null) return ""; return dwMaster["VKALPLZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALPLZ"] = value; OnPropertyChanged("VKALPLZ", value); } } //lENGth 12
        public string VKALORT { get { if (dwMaster == null) return ""; return dwMaster["VKALORT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALORT"] = value; OnPropertyChanged("VKALORT", value); } } //lENGth 40
        public string VKALBZ { get { if (dwMaster == null) return ""; return dwMaster["VKALBZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALBZ"] = value; OnPropertyChanged("VKALBZ", value); } } //lENGth 2
        public string VKALBZBEZ { get { if (dwMaster == null) return ""; return dwMaster["VKALBZBEZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALBZBEZ"] = value; OnPropertyChanged("VKALBZBEZ", value); } } //lENGth 13
        public string VKALCOUNTY { get { if (dwMaster == null) return ""; return dwMaster["VKALCOUNTY"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALCOUNTY"] = value; OnPropertyChanged("VKALCOUNTY", value); } } //lENGth 4
        public string VKALCITY { get { if (dwMaster == null) return ""; return dwMaster["VKALCITY"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKALCITY"] = value; OnPropertyChanged("VKALCITY", value); } } //lENGth 4
        public string VKABNAME1 { get { if (dwMaster == null) return ""; return dwMaster["VKABNAME1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABNAME1"] = value; OnPropertyChanged("VKABNAME1", value); } } //lENGth 40
        public string VKABNAME2 { get { if (dwMaster == null) return ""; return dwMaster["VKABNAME2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABNAME2"] = value; OnPropertyChanged("VKABNAME2", value); } } //lENGth 40
        public string VKABSTRASSE1 { get { if (dwMaster == null) return ""; return dwMaster["VKABSTRASSE1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABSTRASSE1"] = value; OnPropertyChanged("VKABSTRASSE1", value); } } //lENGth 40
        public string VKABSTRASSE2 { get { if (dwMaster == null) return ""; return dwMaster["VKABSTRASSE2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABSTRASSE2"] = value; OnPropertyChanged("VKABSTRASSE2", value); } } //lENGth 40
        public string VKABLKZ { get { if (dwMaster == null) return ""; return dwMaster["VKABLKZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABLKZ"] = value; OnPropertyChanged("VKABLKZ", value); } } //lENGth 3
        public string VKABPLZPF { get { if (dwMaster == null) return ""; return dwMaster["VKABPLZPF"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABPLZPF"] = value; OnPropertyChanged("VKABPLZPF", value); } } //lENGth 12
        public string VKABPOSTF { get { if (dwMaster == null) return ""; return dwMaster["VKABPOSTF"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABPOSTF"] = value; OnPropertyChanged("VKABPOSTF", value); } } //lENGth 15
        public string VKABPLZ { get { if (dwMaster == null) return ""; return dwMaster["VKABPLZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABPLZ"] = value; OnPropertyChanged("VKABPLZ", value); } } //lENGth 12
        public string VKABORT { get { if (dwMaster == null) return ""; return dwMaster["VKABORT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABORT"] = value; OnPropertyChanged("VKABORT", value); } } //lENGth 40
        public string VKABBZ { get { if (dwMaster == null) return ""; return dwMaster["VKABBZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABBZ"] = value; OnPropertyChanged("VKABBZ", value); } } //lENGth 2
        public string VKABBZBEZ { get { if (dwMaster == null) return ""; return dwMaster["VKABBZBEZ"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABBZBEZ"] = value; OnPropertyChanged("VKABBZBEZ", value); } } //lENGth 13
        public string VKABCOUNTY { get { if (dwMaster == null) return ""; return dwMaster["VKABCOUNTY"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABCOUNTY"] = value; OnPropertyChanged("VKABCOUNTY", value); } } //lENGth 4
        public string VKABCITY { get { if (dwMaster == null) return ""; return dwMaster["VKABCITY"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABCITY"] = value; OnPropertyChanged("VKABCITY", value); } } //lENGth 4
        public string VKABANSPNA { get { if (dwMaster == null) return ""; return dwMaster["VKABANSPNA"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABANSPNA"] = value; OnPropertyChanged("VKABANSPNA", value); } } //lENGth 40
        public string VKAADRSL1 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSL1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSL1"] = value; OnPropertyChanged("VKAADRSL1", value); } } //lENGth 8
        public string VKAKUNDNR1 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNR1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNR1"] = value; OnPropertyChanged("VKAKUNDNR1", value); } } //lENGth 8
        public string VKAANZ1 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZ1"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZ1"] = value; OnPropertyChanged("VKAANZ1", value); } } //lENGth 2
        public string VKAADRSLK11 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK11"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK11"] = value; OnPropertyChanged("VKAADRSLK11", value); } } //lENGth 8
        public string VKAKUNDNRK11 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK11"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK11"] = value; OnPropertyChanged("VKAKUNDNRK11", value); } } //lENGth 8
        public string VKAANZK11 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK11"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK11"] = value; OnPropertyChanged("VKAANZK11", value); } } //lENGth 2
        public string VKAADRSLK21 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK21"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK21"] = value; OnPropertyChanged("VKAADRSLK21", value); } } //lENGth 8
        public string VKAKUNDNRK21 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK21"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK21"] = value; OnPropertyChanged("VKAKUNDNRK21", value); } } //lENGth 8
        public string VKAANZK21 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK21"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK21"] = value; OnPropertyChanged("VKAANZK21", value); } } //lENGth 2
        public string VKAADRSL2 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSL2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSL2"] = value; OnPropertyChanged("VKAADRSL2", value); } } //lENGth 8
        public string VKAKUNDNR2 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNR2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNR2"] = value; OnPropertyChanged("VKAKUNDNR2", value); } } //lENGth 8
        public string VKAANZ2 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZ2"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZ2"] = value; OnPropertyChanged("VKAANZ2", value); } } //lENGth 2
        public string VKAADRSLK12 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK12"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK12"] = value; OnPropertyChanged("VKAADRSLK12", value); } } //lENGth 8
        public string VKAKUNDNRK12 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK12"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK12"] = value; OnPropertyChanged("VKAKUNDNRK12", value); } } //lENGth 8
        public string VKAANZK12 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK12"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK12"] = value; OnPropertyChanged("VKAANZK12", value); } } //lENGth 2
        public string VKAADRSLK22 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK22"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK22"] = value; OnPropertyChanged("VKAADRSLK22", value); } } //lENGth 8
        public string VKAKUNDNRK22 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK22"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK22"] = value; OnPropertyChanged("VKAKUNDNRK22", value); } } //lENGth 8
        public string VKAANZK22 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK22"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK22"] = value; OnPropertyChanged("VKAANZK22", value); } } //lENGth 2
        public string VKAADRSL3 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSL3"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSL3"] = value; OnPropertyChanged("VKAADRSL3", value); } } //lENGth 8
        public string VKAKUNDNR3 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNR3"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNR3"] = value; OnPropertyChanged("VKAKUNDNR3", value); } } //lENGth 8
        public string VKAANZ3 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZ3"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZ3"] = value; OnPropertyChanged("VKAANZ3", value); } } //lENGth 2
        public string VKAADRSLK13 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK13"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK13"] = value; OnPropertyChanged("VKAADRSLK13", value); } } //lENGth 8
        public string VKAKUNDNRK13 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK13"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK13"] = value; OnPropertyChanged("VKAKUNDNRK13", value); } } //lENGth 8
        public string VKAANZK13 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK13"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK13"] = value; OnPropertyChanged("VKAANZK13", value); } } //lENGth 2
        public string VKAADRSLK23 { get { if (dwMaster == null) return ""; return dwMaster["VKAADRSLK23"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAADRSLK23"] = value; OnPropertyChanged("VKAADRSLK23", value); } } //lENGth 8
        public string VKAKUNDNRK23 { get { if (dwMaster == null) return ""; return dwMaster["VKAKUNDNRK23"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAKUNDNRK23"] = value; OnPropertyChanged("VKAKUNDNRK23", value); } } //lENGth 8
        public string VKAANZK23 { get { if (dwMaster == null) return ""; return dwMaster["VKAANZK23"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAANZK23"] = value; OnPropertyChanged("VKAANZK23", value); } } //lENGth 2
        public string VKAFREITXT { get { if (dwMaster == null) return ""; return dwMaster["VKAFREITXT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAFREITXT"] = value; OnPropertyChanged("VKAFREITXT", value); } } //lENGth 1
        public string VKAAESTAT { get { if (dwMaster == null) return ""; return dwMaster["VKAAESTAT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAESTAT"] = value; OnPropertyChanged("VKAAESTAT", value); } } //lENGth 1
        public string VKABESTTXT { get { if (dwMaster == null) return ""; return dwMaster["VKABESTTXT"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKABESTTXT"] = value; OnPropertyChanged("VKABESTTXT", value); } } //lENGth 1
        public string VKAFILLER4 { get { if (dwMaster == null) return ""; return dwMaster["VKAFILLER4"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAFILLER4"] = value; OnPropertyChanged("VKAFILLER4", value); } } //lENGth 98
        public double VKAAENZL { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["VKAAENZL"].ToString()); } set { if (dwMaster == null) return; dwMaster["VKAAENZL"] = value; OnPropertyChanged("VKAAENZL", value); } } //lENGth 0
        public string VKAAENB { get { if (dwMaster == null) return ""; return dwMaster["VKAAENB"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKAAENB"] = value; OnPropertyChanged("VKAAENB", value); } } //lENGth 8
        public double VKAAEND { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["VKAAEND"].ToString()); } set { if (dwMaster == null) return; dwMaster["VKAAEND"] = value; OnPropertyChanged("VKAAEND", value); } } //lENGth 0
        public string VKANEUB { get { if (dwMaster == null) return ""; return dwMaster["VKANEUB"].ToString(); } set { if (dwMaster == null) return; dwMaster["VKANEUB"] = value; OnPropertyChanged("VKANEUB", value); } } //lENGth 8
        public double VKANEUD { get { if (dwMaster == null) return 0.0; return Convert.ToDouble(dwMaster["VKANEUD"].ToString()); } set { if (dwMaster == null) return; dwMaster["VKANEUD"] = value; OnPropertyChanged("VKANEUD", value); } } //lENGth 0

    }
}
